<template>
  <div class="title">
    <div class="title-left">
      <div class="tit">{{ title }}</div>
      <div class="titen">{{ tit }}</div>
    </div>
    <div v-if="more" class="title-right" @click="more">
      更多
      <img src="@/assets/more1.png" alt="" />
    </div>
  </div>
</template>
<script setup lang="ts">
defineProps(["title", "tit", "more"]);
import { useRouter } from 'vue-router';
const router = useRouter();
const more = () => {
  const routeData = router.resolve("/allnews");
  window.open(routeData.href, "_blank");
};

</script>
<style lang="scss" scoped>
.title {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  .tit {
    font-weight: 600;
    font-size: 1.5rem;
    color: #0f2e4d;
    line-height: 2.0625rem;
  }
  .titen {
    font-weight: 400;
    font-size: 0.875rem;
    color: #96a3b1;
    line-height: 1.25rem;
    margin-top: 0.25rem;
  }
  .title-right {
    font-size: 1rem;
    color: #96a3b1;
    line-height: 1.375rem;
    display: flex;
    align-items: center;
    cursor: pointer;
  }
}
</style>
